﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NCRGEA.Reports
{
    public partial class frmTypeReport : Form
    {
        private int TypeID = 1;
        public frmTypeReport()
        {
            InitializeComponent();
        }

        public frmTypeReport(int TypeID) : this()
        {
            this.TypeID = TypeID;
            DataTable dt = AAL.DAL.ExecuteQuery("SELECT Name FROM memTypes WHERE TypeID=" + TypeID);
            if (dt != null || dt.Rows.Count == 1)
                this.Text = dt.Rows[0][0].ToString() + " Member Report";
        }

        private void frmTypeReport_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'nCRGEADataSet.StandardMembers' table. You can move, or remove it, as needed.
            this.standardMembersTableAdapter.FillByTypeID(this.nCRGEADataSet.StandardMembers, TypeID);
            this.reportViewer1.RefreshReport();
        }
    }
}
